package cn.edu.gdut.deepcode.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 画布快照表
 * </p>
 *
 * @author author
 * @since 2025-04-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("canvas_snapshot")
@ApiModel(value="CanvasSnapshot对象", description="画布快照表")
public class CanvasSnapshot implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "画布id")
    private Long canvasId;

    @ApiModelProperty(value = "画布json数据")
    private String canvasData;

    @ApiModelProperty(value = "快照版本号")
    private Long version;

    @ApiModelProperty(value = "偏移量(画布操作表的id偏移量)")
    private Long offset;

    @ApiModelProperty(value = "逻辑删除字段,0表示未删除,1表示删除")
    @TableField("deleted")
    private Boolean deleted;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime=LocalDateTime.now();


}
